package com.pinda.feign;

import com.pinda.oms.entity.PdOrder;
import com.pinda.oms.entity.PdOrderCargo;
import com.pinda.oms.entity.PdOrderLocation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * <p>
 * 订单 前端控制器
 * </p>
 *
 * @author lc
 * @since 2023-06-14
 */
@FeignClient(value = "oms-service",url = "http://127.0.0.1:2006")
public  interface PdOrderControllerFeignClients {

    @PostMapping("pd-order/saveOrder")
    public PdOrder saveOrder(@RequestBody PdOrder pdOrder);

    @PostMapping("pd-order-cargo/saveOrderCargo")
    public boolean saveOrderCargo(@RequestBody PdOrderCargo pdOrderCargo);

    @PostMapping("pd-order-location/saveOrderLocation")
    public boolean saveOrderLocation(@RequestBody PdOrder pdOrder);

//    @PostMapping("queryOrder")
//    public List<PdOrder> queryOrder(String memberId);

    @PostMapping("pd-order/queryOrder/{memberId}")
    public List<PdOrder> queryOrder(@PathVariable("memberId") String memberId);

    @PostMapping(value = "pd-order/queryByIdOrder/{id}")
    PdOrder queryByIdOrder(@PathVariable("id") String id);
}
